package org.example.rubbish.service;

import org.example.rubbish.dto.AlarmDTO;
import org.example.rubbish.entity.Alarm;
import org.example.rubbish.service.impl.AlarmServiceImpl;

import java.util.List;

public interface AlarmService {

    // 处理新报警
    boolean processNewAlarm(AlarmDTO alarmDTO);

    // 确认报警
    boolean acknowledgeAlarm(String alarmId, String acknowledgedBy);

    // 获取未确认报警列表
    List<Alarm> getUnacknowledgedAlarms();

    // 获取指定源的报警
    List<Alarm> getAlarmsBySource(String source, int hours);

    // 获取报警统计
    AlarmServiceImpl.AlarmStatistics getAlarmStatistics();
    List<AlarmDTO> getAlarmsFromDatabase(Integer hours, Boolean acknowledged, Integer limit, String source, String level);
    List<AlarmDTO> getRecentUnacknowledgedAlarms(int hours);
    AlarmDTO convertAlarmToDTO(Alarm alarm);
}